package cn.laixueit.demo;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.DigestUtils;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class MD5Demo {

    @Test
    public void t(){
        String hex = DigestUtils.md5DigestAsHex("123456".getBytes());
        System.out.println(hex);
    }
}
